home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!news
- From: miker3@ix.netcom.com (Mike Rubenstein)
- Newsgroups: comp.lang.c++
- Subject: Re: Advanced C++ question...
- Date: Sat, 23 Mar 1996 13:41:27 GMT
- Organization: Netcom
- Message-ID: <3153ff33.260214839@nntp.ix.netcom.com>
- References: <4iprfg$1ui@aadt> <4iv31k$ch7@transformer.pti-us.com>
- NNTP-Posting-Host: ix-dc9-01.ix.netcom.com
- X-NETCOM-Date: Sat Mar 23 7:41:39 AM CST 1996
- X-Newsreader: Forte Agent .99d/32.182
-
- Walt Dixon <wv.dixon@pti-us.com> wrote:
-
- > You might try something like this
- >
- > object& operator*(int);
- > object& operator*(int) const;
- >
- > the first being the lvalue operator, the second
- > being the rvalue operator
-
- Why should he try something that won't work?
-
- The decision as to whether to use the const or nonconst version is
- based only on whether the object for which it is called is const or
- not. It has nothing to do with whether the result is being used as an
- lvalue or rvalue.
-
- Michael M Rubenstein
-